Contents | Index | < Browse | Browse >
LETTERifstreamULETTER
A class for file input operations.
Overview
#include <iostream.h>
class ifstream : public istream {
public:
ifstream();
ifstream(const char *, int = ios::in);
virtual ~ifstream();
void open(const char *, int = ios::in);
void close();
filebuf *rdbuf();
};
Portability
AT&T Release 2 streams library
Description
The "ifstream" class provides an input stream for files. It uses the filebuf
class as streambuf.
Constructors
ifstream::ifstream();
Initializes an object without opening a file.
ifstream::ifstream(const char *, int);
Initializes an object and opens the specified file.
Deconstructors
ifstream::~ifstream();
Closes the file if it is open.
Methods
void open(const char *, int);
Opens the file with the specified name and mode.
void close();
Closes the file.
filebuf *rdbuf();
Returns a pointer to the file puffer used.
See also
istream , fstream , ofstream , filebuf